//
//  ChatModel.h
//  MQTT-Demo
//
//  Created by zhaoguoteng on 2020/4/11.
//  Copyright © 2020 zhaoguoteng. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <YYModel/YYModel.h>

typedef NSString * ChatTypeEnum;
static ChatTypeEnum const kChatTypeEnumText  = @"text";
static ChatTypeEnum const kChatTypeEnumImage = @"image";



@interface ChatBodyModel : NSObject <YYModel>

@property(nonatomic, strong) NSArray *body;

@end

@interface ChatModel : NSObject <YYModel>

@property(nonatomic, strong) NSString *type;
@property(nonatomic, strong) id content;

@end

@interface ChatTextModel : NSObject <YYModel>

@property(nonatomic, strong) NSString *text;

+ (ChatBodyModel *)body:(NSString *)text;

@end


/// https://upload-images.jianshu.io/upload_images/106726-118bc5cb609b49fc.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240
@interface ChatImgModel : NSObject <YYModel>

@property(nonatomic, strong) NSString *url;
@property(nonatomic, assign) CGFloat width;
@property(nonatomic, assign) CGFloat height;

@end

//@interface XXX : NSObject <YYModel>
//
//@property(nonatomic, strong) NSString *type;
//@property(nonatomic, strong) NSString *size;
//@property(nonatomic, strong) NSString *width;
//@property(nonatomic, strong) NSString *height;
//@property(nonatomic, strong) NSString *url;
//
//@end

/*
{
 "body": [
    {
        "type": "text",
        "content": {
            "text": "hello world"
        }
    }
 ]
}
 
 {
 "body": [
         {
         "type": "image",
         "content": {
             "uuid": "1853095_d61040894ac3de44cdfffb3ec7eb720f",
             "imageformat": 1
                }
         }
    ]
 }
 
*/
